<style>
#editor_report h1.report{
	padding-left:24px;
}
#editor_report form{
	width:800px;
}
#editor_report form input[type=submit]{
	float:right;
}
#editor_report form fieldset{
	float:left;
}
#editor_report legend input{
	float:none;
	margin:2px 2px 0px 5px;
}
#editor_report legend label{
	float:none;
}
#editor_report legend span{
	float:none;
}
#editor_report input.datePicker{
	margin-right:5px;
}
#editor_report .block1{
	float:left;
}
#editor_report .block label{
	width:80px;
}
#editor_report #report_editor_result{
	margin-top:2px;
}
#editor_report #report_editor_result ul.letter_filter{
	margin:5px;
}
#editor_report #report_editor_result ul.letter_filter li strong{
	width:auto;
}
#editor_report #report_editor_result ul.letter_filter li.last a:hover,
#editor_report #report_editor_result ul.letter_filter li.first a:hover{
	background-color:transparent;
}
#editor_report #report_editor_result{
	width:1000px;
}
#editor_report #report_editor_result table{
	width:100%;
}
#editor_report #report_editor_result table tr.even{
	background-color:#FFFFCC;
}
#editor_report #report_editor_result table tr.odd{
}
#editor_report #report_editor_result table tr td{
	vertical-align:top;
}
#editor_report #report_editor_result table tr td ol{
	margin:0px;
	padding:0px 0px 0px 15px;
}
#editor_report #report_editor_result .materijal_info{
	position:absolute;
	padding:2px;
	background:#fff;
	border:1px solid #000;
	visibility:hidden;
}
</style>
<div id="editor_report">
	<form method="post" action="javascript:void(0)" onSubmit="submitForm(this,'ugovori.php','POST','setContent',1)" class="area">
		<h1 class="report">Izveštaj - redakcija</h1>
	
		<input type="hidden" name="a" value="real_report" />
		<input type="hidden" name="mod" value="editor" />
		
		<label class="left" for="f_kampanja">kampanja:</label>
		<select name="f_kampanja" id="f_kampanja">
			{{%loop start kampanja_id}}
			<option value="{{$kampanja_id}}" {{$kampanja_selected}}>{{$kampanja_name}}</option>
			{{%loop end}}
		</select>
		<label class="left" for="f_placeno">plaćeno:</label>
		<select name="f_placeno" id="f_placeno">
			<option value="2" {{$placeno_da_selected}}>plaćeno</option>
			<option value="1" {{$placeno_delimicno_selected}}>delimično plaćeno</option>
			<option value="0" {{$placeno_ne_selected}}>nije plaćeno</option>
		</select>
		<label class="left" for="f_radnik">komercijalista:</label>
		<select name="f_radnik" id="f_radnik">
			<option value="-1">---</option>
			{{%loop start radnik_id}}
			<option value="{{$radnik_id}}" {{$radnik_selected}}>{{$radnik_ime}}&nbsp;{{$radnik_prezime}}</option>
			{{%loop end}}
		</select>
		<br clear="all" />
		<div class="block1">
			<fieldset>
				<legend>
					<span>poslato</span>
					<input title="bez" type="checkbox" class="checkbox" name="f_poslato_bez" id="f_poslato_bez" {{$f_poslato_bez_checked}}/>
					<label for="f_poslato_bez">[bez]</label>
				</legend>
				<label class="left" for="f_poslato_start">od:</label>
				<input type="text" name="f_poslato_start" id="f_poslato_start" class="dateInput" value="{{$f_poslato_start}}" />
				<input type="button" class="datePicker" onClick="displayDatePicker('f_poslato_start',this)" />
				<br clear="all" />
				<label class="left" for="f_poslato_end">do:</label>
				<input type="text" name="f_poslato_end" id="f_poslato_end" class="dateInput" value="{{$f_poslato_end}}" />
				<input type="button" class="datePicker" onClick="displayDatePicker('f_poslato_end',this)" />
			</fieldset>
			<br clear="all" />
			<fieldset>
				<legend>
					<span>obavešten</span>
					<input title="bez" type="checkbox" class="checkbox" name="f_obavesten_bez" id="f_obavesten_bez" {{$f_obavesten_bez_checked}}/>
					<label for="f_obavesten_bez">[bez]</label>
				</legend>
				<label class="left" for="f_obavesten_start">od:</label>
				<input type="text" name="f_obavesten_start" id="f_obavesten_start" class="dateInput" value="{{$f_obavesten_start}}" />
				<input type="button" class="datePicker" onClick="displayDatePicker('f_obavesten_start',this)" />
				<br clear="all" />
				<label class="left" for="f_obavesten_end">do:</label>
				<input type="text" name="f_obavesten_end" id="f_obavesten_end" class="dateInput" value="{{$f_obavesten_end}}" />
				<input type="button" class="datePicker" onClick="displayDatePicker('f_obavesten_end',this)" />
			</fieldset>
			<br clear="all" />
			<fieldset>
				<legend>
					<span>potvrđeno</span>
					<input title="bez" type="checkbox" class="checkbox" name="f_potvrda_bez" id="f_potvrda_bez" {{$f_potvrda_bez_checked}}/>
					<label for="f_potvrda_bez">[bez]</label>
				</legend>
				<label class="left" for="f_potvrda_start">od:</label>
				<input type="text" name="f_potvrda_start" id="f_obavesten_start" class="dateInput" value="{{$f_potvrda_start}}" />
				<input type="button" class="datePicker" onClick="displayDatePicker('f_potvrda_start',this)" />
				<br clear="all" />
				<label class="left" for="f_potvrda_end">do:</label>
				<input type="text" name="f_potvrda_end" id="f_potvrda_end" class="dateInput" value="{{$f_potvrda_end}}" />
				<input type="button" class="datePicker" onClick="displayDatePicker('f_potvrda_end',this)" />
			</fieldset>
		</div>
		
		<fieldset>
			<legend>Materijal</legend>
			
			<fieldset>
				<legend>
					<span>ušао</span>
					<input title="bez" type="checkbox" class="checkbox" name="f_mat_date_bez" id="f_mat_date_bez" {{$f_mat_date_bez_checked}}/>
					<label for="f_mat_date_bez">[bez]</label>
				</legend>
				<label class="left" for="f_mat_date_start">od:</label>
				<input type="text" name="f_mat_date_start" id="f_mat_date_start" class="dateInput" value="{{$f_mat_date_start}}" />
				<input type="button" class="datePicker" onClick="displayDatePicker('f_mat_date_start',this)" />
				<br clear="all" />
				<label class="left" for="f_mat_date_end">do:</label>
				<input type="text" name="f_mat_date_end" id="f_mat_date_end" class="dateInput" value="{{$f_mat_date_end}}" />
				<input type="button" class="datePicker" onClick="displayDatePicker('f_mat_date_end',this)" />
			</fieldset>
			
			<fieldset>
				<legend>
					<span>оčekuje se</span>
					<input title="bez" type="checkbox" class="checkbox" name="f_mat_ocek_date_bez" id="f_mat_ocek_date_bez" {{$f_mat_ocek_date_bez_checked}}/>
					<label for="f_mat_ocek_date_bez">[bez]</label>
				</legend>
				<label class="left" for="f_mat_ocek_date_start">od:</label>
				<input type="text" name="f_mat_ocek_date_start" id="f_mat_ocek_date_start" class="dateInput" value="{{$f_mat_ocek_date_start}}" />
				<input type="button" class="datePicker" onClick="displayDatePicker('f_mat_ocek_date_start',this)" />
				<br clear="all" />
				<label class="left" for="f_mat_ocek_date_end">do:</label>
				<input type="text" name="f_mat_ocek_date_end" id="f_mat_ocek_date_end" class="dateInput" value="{{$f_mat_ocek_date_end}}" />
				<input type="button" class="datePicker" onClick="displayDatePicker('f_mat_ocek_date_end',this)" />
			</fieldset>
			<br clear="all" />
			<div class="block">
				<label class="left" for="f_mat_tip_ulaza">tip ulaza:</label>
				<select name="f_mat_tip_ulaza" id="f_mat_tip_ulaza">
					<option value="-1">---</option>
					{{%loop start tip_ulaza_id}}
					<option value="{{$tip_ulaza_id}}" {{$tip_ulaza_selected}}>{{$tip_ulaza_name}}</option>
					{{%loop end}}
				</select>
				<br clear="all" />
				<label class="left" for="f_mat_tip">tip materijala:</label>
				<select name="f_mat_tip" id="f_mat_tip">
					<option value="-1">---</option>
					{{%loop start tip_mat_id}}
					<option value="{{$tip_mat_id}}" {{$tip_mat_selected}}>{{$tip_mat_name}}</option>
					{{%loop end}}
				</select>
				<br clear="all" />
				<label class="left" for="f_mat_upotrebljiv">upotrebljiv:</label>
				<select name="f_mat_upotrebljiv" id="f_mat_upotrebljiv">
					<option value="-1">---</option>
					<option value="1" {{$f_mat_upo_ne}}>NE</option>
					<option value="2" {{$f_mat_upo_da}}>DA</option>
				</select>
			</div>
			
		</fieldset>
		
		<fieldset>
			<legend>Akcije dizajnera</legend>
			
			<fieldset>
				<legend>
					<span>preuzeto</span>
					<input title="bez" type="checkbox" class="checkbox" name="f_act_uzeo_bez" id="f_act_uzeo_bez" {{$f_act_uzeo_bez_checked}}/>
					<label for="f_act_uzeo_bez">[bez]</label>
				</legend>
				<label class="left" for="f_act_uzeo_start">od:</label>
				<input type="text" class="dateInput" name="f_act_uzeo_start" id="f_act_uzeo_start" value="{{$f_act_uzeo_start}}" />
				<input type="button" class="datePicker" onclick="displayDatePicker('f_act_uzeo_start',this)" />
				<br clear="all" />
				<label class="left" for="f_act_uzeo_end">do:</label>
				<input type="text" class="dateInput" name="f_act_uzeo_end" id="f_act_uzeo_end" value="{{$f_act_uzeo_end}}" />
				<input type="button" class="datePicker" onclick="displayDatePicker('f_act_uzeo_end',this)" />
			</fieldset>
			<fieldset>
				<legend>
					<span>vraćeno</span>
					<input title="bez" type="checkbox" class="checkbox" name="f_act_vratio_bez" id="f_act_vratio_bez" {{$f_act_vratio_bez_checked}}/>
					<label for="f_act_vratio_bez">[bez]</label>
				</legend>
				<label class="left" for="f_act_vratio_start">od:</label>
				<input type="text" class="dateInput" name="f_act_vratio_start" id="f_act_vratio_start" value="{{$f_act_vratio_start}}" />
				<input type="button" class="datePicker" onclick="displayDatePicker('f_act_vratio_start',this)" />
				<br clear="all" />
				<label class="left" for="f_act_vratio_end">do:</label>
				<input type="text" class="dateInput" name="f_act_vratio_end" id="f_act_vratio_end" value="{{$f_act_vratio_end}}" />
				<input type="button" class="datePicker" onclick="displayDatePicker('f_act_vratio_end',this)" />
			</fieldset>
			<br clear="all" />
			<div class="block">
				<label class="left" for="f_act_editor">urednik:</label>
				<select name="f_act_editor" id="f_act_editor">
					<option value="-1">---</option>
					{{%loop start editor_id}}
					<option value="{{$editor_id}}" {{$editor_selected}}>{{$editor_ime}}&nbsp;{{$editor_prezime}}</option>
					{{%loop end}}
				</select>
				<br clear="all" />
				
				<label class="left" for="f_act_designer">dizajner:</label>
				<select name="f_act_designer" id="f_act_designer">
					<option value="-1">---</option>
					{{%loop start designer_id}}
					<option value="{{$designer_id}}" {{$designer_selected}}>{{$designer_ime}}&nbsp;{{$designer_prezime}}</option>
					{{%loop end}}
				</select>
				<br clear="all" />
				
				<label class="left" for="f_act_uradjen">urađeno:</label>
				<select name="f_act_uradjen" id="f_act_uradjen">
					<option value="-1">---</option>
					<option value="1" {{$f_act_uradjen_ne}}>NE</option>
					<option value="2" {{$f_act_uradjen_da}}>DA</option>
				</select>
			</div>
		</fieldset>
		<input type="submit" value="kreiraj" />
	</form>
	<br clear="all" />
	<div class="area_white" id="report_editor_result">
		{{$comment_start}}
		
		<input type="button" class="excel" value="export" style="float:right" onclick="exportCSV(document.getElementById('EditorReportTable'))" />
		
		<div class="info">Ukupno:&nbsp;{{$ukupno}}</div>
		<ul class="letter_filter" filterquery="a=real_report&mod=editor&{{$filter_query}}">
			<li><strong>Strana [{{$numpages}}]:</strong></li>
			<li class="first"><a title="prva strana" href="javascript:void(0)" onclick="PageFilter(this,'ugovori.php',1)"><img src="gui/record_first.gif" border="0" /></a></li>
			{{%loop start page}}
			<li><a href="javascript:void(0)" onclick="PageFilter(this,'ugovori.php',{{$page}})" {{$page_current}}>{{$page}}</a></li>
			{{%loop end}}
			<li class="last"><a title="poslednja strana [{{$numpages}}]" href="javascript:void(0)" onclick="PageFilter(this,'ugovori.php',{{$numpages}})"><img src="gui/record_last.gif" border="0" /></a></li>
		</ul>
		<br clear="all" />
		<table id="EditorReportTable">
			<tr class="head" align="center">
				<td>ugovor</td>
				<td>komitent</td>
				<td>komercijalista</td>
				<td>stavka</td>
				<td>materijal</td>
				<td>akcije dizajnera</td>
			</tr>
			{{%loop start ugovor_id}}
			<tr class="{{$class}}">
				<td>
					<a href="javascript:void(0)" onclick="blankTarget('LoadRSDoc(\'ugovori.php?a=display&id={{$ugovor_id}}\',\'setContent\')')">
						{{$ugovor_broj}}
					</a>
				</td>
				<td>
					<a href="javascript:void(0)" onclick="blankTarget('LoadRSDoc(\'komitenti.php?a=displayOne&id={{$komitent_id}}\',\'setContent\')')">
						{{$komitent_id}}.&nbsp;{{$komitent_name}}
					</a>
				</td>
				<td>{{$komercijalista}}</td>
				<td class="small">{{$stavka}}</td>
				<td class="small">{{$materijal}}</td>
				<td class="small">{{$akcije_dizajnera}}</td>
			</tr>
			{{%loop end}}
		</table>
		{{$comment_end}}
	</div>
</div>